<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of UserController
 *
 * @author MinhNguyen
 */

class TweetController {
    //put your code here
    public $model;
    public $view;
    
    public function __construct($model, $view) {
        $this->model = $model;
        $this->view = $view;
    }
    
    public function postTweet($tweetMessage) {
        // Check for 140 characters
        if(strlen($tweetMessage) <= 140)
        {
            // Post the status message
            $this->model->tweet->post('statuses/update', array('status' => $tweetMessage));
        }
    }
}
?>
